<?php if(!defined('BASEPATH')) exit('No direct script access allowed');

class Notice extends CI_Controller {
    
    public function __construct(){
        parent::__construct();
		$this->common_model->checkpurview();
		 
    }
	
	public function single(){
	    $where['order']  = 'id desc'; 
	    $where['isdel']  = 0;
		$where['nexttime >='] = date_query(5);
		$where['nexttime <='] = date_query(6);
		$where['limit1'] = 0;
		$where['limit2'] = 5;
		$data['list'] = $this->mysql_model->get_results('single',$where); 
		$this->load->view('notice/single',$data);
	}
	
	public function contract(){
	    $where['isdel']    = 0;
		$where['edate >='] = date_query(5);
		$where['edate <='] = date_query(6);
		$where['limit1']   = 0;
		$where['limit2']   = 5;
		$data['list'] = $this->mysql_model->get_results('contract',$where); 
		$this->load->view('notice/contract',$data);
	}
	
	public function msg(){
		$data['list'] = $this->mysql_model->get_results('message',array('isdel'=>0,'isread'=>0,'receivname'=>$this->session->userdata('name'))); 
		$this->load->view('notice/msg',$data);
	}
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */